package com.qingcloud.adminbackend.mapper;

import com.qingcloud.adminbackend.entity.config.SysDictionaryConfig;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author liuziyong
 * @since 2019-04-12
 */
public interface SysDictionaryConfigMapper extends BaseMapper<SysDictionaryConfig> {

    /**
     * 通过type获取数据字典配置
     */
    List<SysDictionaryConfig> findByType(@Param("type") Integer type);

    /**
     * 通过父编码查询子配置
     */
    List<SysDictionaryConfig> findByParent(@Param("parent") Integer parent);

    SysDictionaryConfig findConfigByObject(@Param("type") Integer type, @Param("parent") Integer parent, @Param("code") String code);

}
